<#macro editModal
id=""
title=""
modalDialog="modal-lg"
showHead=true
showFoot=true
buttonId="btnSave"
buttonName="保存"
buttonGroup=[]
width="-1"
height=""
>
<div id="${id}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog ${modalDialog}" role="document" style="<#if width!="-1">width:${width};</#if>">
        <div class="modal-content">
            <div class="modal-header" <#if !showHead>hidden</#if>>
                <button type="button" class="close" onclick="$('#${id}').modal('hide')" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">${title}</h4>
            </div>
            <div class="modal-body" <#if height!="">style="min-height: ${height}" </#if>>
                <#nested />
            </div>
            <div class="modal-footer" <#if !showFoot>hidden</#if>>
                <#list buttons as buttonGroup>
                    <button id="${buttons.buttonId}" type="button" class="btn btn-success"
                            onclick="${buttons.click}">${buttons.buttonName}</button>
                </#list>
                <button type="button" class="btn btn-default" onclick="$('#${id}').modal('hide')">关闭</button>
                <#if buttonId!="">
                    <button id="${buttonId}" type="button" class="btn btn-success">${buttonName}</button>
                </#if>
            </div>
        </div>
    </div>
</div>
</#macro>
